package com.hc.server.common.constant;

/**
 * Created by wdj on 2024/10/16
 */
public class RedisKey {

    private static final String BASE_KEY = "travel-chat:";

    /**
     * 用户信息
     */
    public static final String USER_INFO_STRING = "userInfo:uid_%d";
    /**
     * 用户token存放
     */
    public static final String USER_TOKEN_STRING = "userToken:uid_%d";

    /**
     * 房间详情
     */
    public static final String ROOM_INFO_STRING = "roomInfo:roomId_%d";

    /**
     * 群组详情
     */
    public static final String GROUP_INFO_STRING = "groupInfo:roomId_%d";

    /**
     * 群组详情
     */
    public static final String GROUP_FRIEND_STRING = "groupFriend:roomId_%d";

    public static String getKey(String key, Object... objects) {
        return BASE_KEY + String.format(key, objects);
    }
}
